// File: FormulaicSummer.java
// Purpose: This implements a summed series using the summed series formula.
//   x = n(n+1)/2
public class FormulaicSummer {
	public long sum(int start, int stop){
		int bigseries = stop*(stop+1)/2;
		start--; // so result is inclusive of start
		int littleseries = start*(start+1)/2;
		return bigseries-littleseries;
	}

}